<?php
/**
 * Created by PhpStorm.
 * User: zyw
 * Date: 2018-03-19
 * Time: 15:36
 */

class DistrictModel extends MY_Model{

    protected $table = 't_district';

    public function __construct(){
        parent::__construct();
    }

    /**
     * 获取城市名称
     * @param $city_id
     * @return mixed
     * @throws Exception
     */
    public function getCityName($city_id){
        $where = array("id" => $city_id);
        $city = $this->query_one($where);
        return $city["name"];
    }
}